<?php
namespace UserProposal;

/**
 * Кнопка предложения пользователя
 *
 * @author kosh
 *        
 */
abstract class ButtonAction extends \Action {
	protected static $layout = "";

	protected $type;
	
	static function pullParams() {
		return ['identity'];
	}
	
	function getUserId() {
		return $this->request->_identity;
	}
	
	protected function run() {
		$this->response->setData($this->request->params());
		// получаем состояние текущего
		$this->response->proposal = Proposal::get(
			$this->getUserId(), 
			$this->type, 
			$this->request->id
		);
	}
}